/* 滚动条 */
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
/*定义滚动条轨道（track）和滑块（thumb）*/
::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track-bg-color);

  &:hover {
    background-color: var(--scrollbar-track-hover-bg-color);
  }
  &:active {
    background-color: var(--scrollbar-track-active-bg-color);
  }
}
::-webkit-scrollbar-thumb {
  border-radius: 3px;

  &:vertical {
    background: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 37.5%,
      var(--scrollbar-thumb-bg-color) 37.5%,
      var(--scrollbar-thumb-bg-color) 68.7%,
      rgba(0, 0, 0, 0) 68.7%
    );
    &:hover {
      background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 37.5%,
        var(--scrollbar-thumb-hover-bg-color) 37.5%,
        var(--scrollbar-thumb-hover-bg-color) 68.7%,
        rgba(0, 0, 0, 0) 68.7%
      );
    }
    &:active {
      background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 37.5%,
        var(--scrollbar-thumb-active-bg-color) 37.5%,
        var(--scrollbar-thumb-active-bg-color) 68.7%,
        rgba(0, 0, 0, 0) 68.7%
      );
    }
  }
  &:horizontal {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 37.5%,
      var(--scrollbar-thumb-bg-color) 37.5%,
      var(--scrollbar-thumb-bg-color) 68.7%,
      rgba(0, 0, 0, 0) 68.7%
    );
    &:hover {
      background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 37.5%,
        var(--scrollbar-thumb-hover-bg-color) 37.5%,
        var(--scrollbar-thumb-hover-bg-color) 68.7%,
        rgba(0, 0, 0, 0) 68.7%
      );
    }
    &:active {
      background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 37.5%,
        var(--scrollbar-thumb-active-bg-color) 37.5%,
        var(--scrollbar-thumb-active-bg-color) 68.7%,
        rgba(0, 0, 0, 0) 68.7%
      );
    }
  }
}

// 定义滚动条的按钮块*!
::-webkit-scrollbar-button {
  width: 10px;
  height: 10px;
}
